//
//  CZPictureViewCell.m
//  XinLang_OC
//
//  Created by WONG on 16/3/15.
//  Copyright © 2016年 cheuhui. All rights reserved.
//

#import "CZPictureViewCell.h"

@interface CZPictureViewCell ()

@property (nonatomic,strong) UIImageView *bkgImageView;

@end

@implementation CZPictureViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self prepareUI];
    }
    return self;
}

- (void)prepareUI {
    [self.contentView addSubview:self.bkgImageView];
    
    //[self.bkgImageView ff_Fill:self.contentView insets:UIEdgeInsetsZero];
    
    [self.bkgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        // 填充父控件
        make.edges.equalTo(self.contentView);
    }];
}

- (void)setImageURL:(NSURL *)imageURL {
    _imageURL = imageURL;
    
    [self.bkgImageView sd_setImageWithURL:_imageURL];
    //[self.bkgImageView sd_setImageWithURL:_imageURL placeholderImage:[UIImage imageNamed:@"tabbar_home_highlighted"]];
}


- (UIImageView *)bkgImageView {
    if (!_bkgImageView) {
        _bkgImageView = [[UIImageView alloc] init];
    }
    return _bkgImageView;
}

@end
